How to Miscompile Programs with "Benign" Data Races
نویسنده
چکیده
Several prior research contributions [15, 9] have explored the problem of distinguishing “benign” and harmful data races to make it easier for programmers to focus on a subset of the output from a data race detector. Here we argue that, although such a distinction makes sense at the machine code level, it does not make sense at the C or C++ source code level. In one sense, this is obvious: The upcoming thread specifications for both languages [6, 7] treat all data races as errors, as does the current Posix threads specification. And experience has shown that it is difficult or impossible to specify anything else. [1, 2] Nonetheless many programmers clearly believe, along with [15] that certain kinds of data races can be safely ignored in practice because they will produce expected results with all reasonable implementations. Here we show that all kinds of C or C++ source-level “benign” races discussed in the literature can in fact lead to incorrect execution as a result of perfectly reasonable compiler transformations, or when the program is moved to a different hardware platform. Thus there is no reason to believe that a currently working program with “benign races” will continue to work when it is recompiled. Perhaps most surprisingly, this includes even the case of potentially concurrent writes of the same value by different threads.
منابع مشابه
Techniques to Detect and Avert Advanced Software
Multicore machines have become pervasive and, as a result, parallel programming has received renewed interest. Unfortunately, writing correct parallel programs is notoriously hard. One challenging problem is how to ship correct programs. Dynamic analysis tools are very useful to find errors in parallel programs by automatically analyzing the runtime information. They often capture errors from w...
متن کاملUnderstanding Data Races in MySQL
Data races are notorious for their close relationship to many painful concurrency bugs that are very difficult to locate. On the other hand, it is both impossible and unnecessary to forbid every data race in large software systems, by locking every shared variable. It is impossible since we cannot afford for the performance deterioration by locking everything. It is unnecessary since most of th...
متن کاملDetecting Data Races with Java PathFinder
Roughly speaking, a (data) race on a shared variable arises in a concurrent program if two threads access that variable simultaneously and the accesses are conflicting, that is, at least one of them writes to the variable. Although some races are benign, races often are an indication of bugs. Hence, tools that detect them are invaluable to those writing concurrent programs. Many tools have been...
متن کاملExperience with Techniques for Refining Data Race Detection
Dynamic data race detection is a critical part of debugging shared-memory parallel programs. The races that can be detected must be refined to filter out false alarms and pinpoint only those that are direct manifestations of bugs. Most race detection methods can report false alarms because of imprecise run-time information and because some races are caused by others. To overcome this problem, r...
متن کاملRecord/Play in the Presence of Benign Data Races
In this article we present our experience with the integration of record/replay in the Jalape~ no virtual machine. The goal of record/replay is to be able to faithfully replay an application. Previous work in Jalape~ no focused on the replay of Java applications on uni-processors. Here we describe additional work done to obtain replay with low intrusion on multi-processor systems by doing `orde...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2011